package com.example.demo.controller;

import com.example.demo.dto.CollegeManagementResultDTO;
import com.example.demo.service.CollegeManagementService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/college-management")
@CrossOrigin
public class CollegeManagementController {

    @Autowired
    private CollegeManagementService collegeManagementService;

    @Operation(summary = "查询所有学院的 MBTI 测试结果")
    @GetMapping("/results")
    public List<CollegeManagementResultDTO> getCollegeResults() {
        return collegeManagementService.getAllCollegeResults();
    }
}
